package com.power.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.power.domain.Sku;
import com.power.service.SkuService;
import com.power.mapper.SkuMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author dingchunlin
* @description 针对表【sku(单品SKU表)】的数据库操作Service实现
* @createDate 2024-07-10 15:12:14
*/
@Service
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuService{

    /**
     * 根据产品ID查询SKU列表
     * @param prodId 产品ID
     * @return SKU列表
     */
    @Override
    public List<Sku> loadSkuByProdId(Long prodId) {
        return this.baseMapper.selectList(new LambdaQueryWrapper<Sku>()
               .eq(Sku::getProdId, prodId));
    }
}




